home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / FWRunTyp / Sources / FWWep.cpp < prev   
Encoding:
Text File  |  1994-04-21  |  1.7 KB  |  69 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWWep.cpp
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Creation Date:        3/28/94
  7. //
  8. //    Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11. /*
  12.  
  13. Some notes on WEP's that are not in the manuals:
  14.  
  15.  o    Some of the examples in the documentastion include the RESIDENTNAME
  16.     attribute on the WEP exports.  Althought documentation does not say so,
  17.     this is required.
  18.  
  19.  o    Although the documentation says that WEP's have no return valus, they really
  20.     do.  WEP's return a sucess/failure code: 1 of OK, 0 if failed.  What windows
  21.     does if a WEP fails is unknown.
  22.  
  23.  o    When a WEP is called when that calling application terminates (as opposed to
  24.     an UnloadLibrary call) it is called on a very small kernel stack.  There is
  25.     not enough space on this stack for the kernel to swap in a new segment.  Can
  26.     you say "kernel bug"?  Therefore WEP's must be in FIXED PRELOAD segments and
  27.     must be *extremly* cautious with stack usage.  The actual amount of stack
  28.     remaining is not known.
  29.  
  30. This information is from Microsoft technical support.
  31. */
  32.  
  33. #if defined(FW_BUILD_WIN) && !defined(FW_BUILD_WIN32S) && !defined(FW_BUILD_WINNT)
  34.  
  35. #ifdef CCOVER
  36. #  pragma cov-
  37. #endif
  38.  
  39. // Make sure WEP doesn't get mangled
  40.  
  41. extern "C"
  42. {
  43.   int  _far _pascal  WEP(int sys_exit);
  44.  
  45. #ifdef CCOVER
  46.   int  _far _cdecl   atexit(void);
  47.   void _far _cdecl   cov_write(void);
  48. #endif
  49. };
  50.  
  51.  
  52. int _far _pascal WEP(int sys_exit)
  53. {
  54. #ifdef CCOVER
  55.     cov_write();
  56. #endif
  57.  
  58.     return(1);
  59. }
  60.  
  61. #ifdef CCOVER
  62. int _far _cdecl atexit(void)
  63. {
  64.     return(0);
  65. }
  66. #endif
  67.  
  68. #endif
  69.